package com.minminaya.source;


/**
 * 输出链表的镜像，前序遍历加遍历
 */
public class Algorithm_16 {

    public static class BinaryTreeNode {
        int value;
        BinaryTreeNode left;
        BinaryTreeNode right;
    }

    public static void mirror(BinaryTreeNode node) {
        if (node != null) {
            BinaryTreeNode temp = node.left;
            node.left = node.right;
            node.right = temp;

            mirror(node.left);
            mirror(node.right);

        }
    }
}
